<?php

namespace App\Models\Account;

use App\Models\BaseModel;

class UserLog extends BaseModel
{

    protected $table = 'user_logs';
    protected $fillable = ['user_id', 'ip', 'address', 'type', 'data_scope'];

    public function user()
    {
        return $this->belongsTo('App\Models\Account\User', 'user_id');
    }

    public function addLog($data)
    {
        return $this->create($data);
    }

}
